#include <bits/stdc++.h>

#define in read()
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define ep emplace
#define rep(i, x, y) for(int i = (x); i <= (y); i++)
#define per(i, x, y) for(int i = (x); i >= (y); i--)

using namespace std;

int read() {
	int x = 0; bool f = 0; char ch = getchar();
	while(!isdigit(ch)) f |= ch == '-', ch = getchar();
	while(isdigit(ch)) x = x * 10 + (ch ^ 48), ch = getchar();
	return f ? -x : x;
}

using ll = long long;
using db = double;
using pii = pair < int, int >;
using vec = vector < int >;
using veg = vector < pii >;
using tl = tuple < int, int, int >;

const int N = 510;
const int mod = 998244353;

int f[N << 1][N], n, x, pw[N][N], fac[N], ifac[N];
int ans;

ll qp(ll x, int t) { ll res = 1; for(; t; t >>= 1, x = x * x % mod) if(t & 1) res = res * x % mod; return res; }

int main() {
#ifndef ONLINE_JUDGE
	freopen("1.in", "r", stdin);
#endif
	n = in, x = in;
	rep(i, 0, n) pw[0][i] = 1;
	rep(i, 1, n) {
		pw[i][0] = 1;
		rep(k, 1, n) pw[i][k] = 1ll * pw[i][k - 1] * i % mod;
	}
	fac[0] = 1; rep(i, 1, n) fac[i] = 1ll * fac[i - 1] * i % mod;
	ifac[n] = qp(fac[n], mod - 2); per(i, n - 1, 0) ifac[i] = 1ll * ifac[i + 1] * (i + 1) % mod;
	f[1][n] = 1;
	rep(i, 1, x) {
		(ans += 1ll * f[i][1] * (x - i + 1) % mod) %= mod;
		//		cerr << i << " " << 1 << " " << f[i][1] << endl;
		rep(j, 2, n) if(f[i][j]) {
			rep(k, 1, j)
				(f[i + j - 1][k] += 1ll * f[i][j] * pw[j - 1][j - k] % mod * ifac[j - k] % mod) %= mod;
			//	cerr << i << " " << j << " " << f[i][j] << endl;
		} //cerr << endl;
	} //cerr << ans << endl;
	int tans = 1;
	rep(i, 1, n) tans = 1ll * tans * x % mod, ans = 1ll * ans * i % mod;
	ans = (tans - ans + mod) % mod;
	printf("%d\n", ans);
	return 0;
}
